package com.example.takephoto

import android.os.Bundle
import android.widget.Button
import android.widget.TextView
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat

class MainActivity2 : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        enableEdgeToEdge()
        setContentView(R.layout.activity_main2)
        val tvParam = findViewById<TextView>(R.id.tvParam)
        val btnBack = findViewById<Button>(R.id.btnBack)
        val param = intent.getStringExtra("param") ?: "无参数"
        tvParam.text = "收到参数：\n$param"
        btnBack.setOnClickListener {
            finish()
        }
    }
}